#include "common.h"
#include "def.h"
#include "..\common\types.h"
//#include "..\engine\memorymanager.h"

COLOR4F COLOR4F::white = COLOR4F(1.0f,1.0f,1.0f,1.0f); 
COLOR4F COLOR4F::black = COLOR4F(0.0f,0.0f,0.0f,1.0f); 

COLOR4F COLOR4F::operator = (const float* pColor)
{
	r = pColor[0]; 
	g = pColor[1]; 
	b = pColor[2]; 
	a = pColor[3]; 
	return *this; 
}
const Color3f Color3f::COLOR_WHITE = Color3f(1.0f,1.0f,1.0f); 
const Color3f Color3f::COLOR_BLACK = Color3f(0.0f,0.0f,0.0f); 
Color3f Color3f::operator + (const Color3f &op) const
{
	return Color3f(r + op.r, g + op.g, b + op.b); 
}

Color3f Color3f::operator += (const Color3f &op)
{
	r += op.r; 
	g += op.g; 
	b += op.b; 
	return Color3f(r + op.r, g + op.g, b + op.b); 
}

Color3f Color3f::operator * (const float &op) const
{
	return Color3f(r * op, g * op, b * op); 
}	

Color3f::operator	float * ()
{
	return (float *) this; 
}
Color3f::operator	float * () const
{
	return (float *) this; 
}
